#!/bin/bash
#test
test -e /sbin/ping
tret=$?
if(( $tret == "0" ))
then echo ""
else echo "error=Y:ping not found" ; echo "status=0" ; exit 1
fi

ee=$(ping -c $2 $1 2>/dev/null) 
ret=$?
if(( $ret == "0" ))
then echo "error=N" ; echo "status=1"
else echo "error=Y:$ret" ; echo "status=0"
fi